package com.wx.controller;

import com.wx.common.util.Rest;
import com.wx.feign.TestClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: xj-shop
 * @description: 小程序测试类
 * @author: 徐健
 * @create: 2022-09-01 10:30
 **/
@RestController
public class TestController {
    @Autowired
    private TestClient client;

    @GetMapping(value = "get/user/{id}")
    public Rest getUserById(@PathVariable("id") Integer id){
        System.out.println("用户ID为1");
        return client.test(id);
    }
}
